package com.springcloud.wujie_study_day02_eureka_ribbon.service.impl;

import com.springcloud.wujie_study_day02_eureka_ribbon.service.ServerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @Classname ServerServiceImpl
 * @Description TODO
 * @Date 2019/5/23 17:09
 * @Created by wujie
 */
@Service
public class ServerServiceImpl implements ServerService {
    @Autowired
    private RestTemplate restTemplate;

    @Override
    public String getInfo(String name) {
        return restTemplate.getForObject("http://wujie-study-day01-eureka-client/test?name="+name,String.class);
    }
}
